package p270jp.pxv.android.viewholder;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.RecyclerView;
import p045be.PpointLossHistoryAdapter;
import p216hn.DefaultConstructorMarker;
import p270jp.pxv.android.R;
import p314lg.ViewHolderPpointLossHistoryItemBinding;
import p314lg.ViewSplitOfAmountBinding;
import p325m0.MutabilityOwnership;
import p374nm.SplitOfAmountView;
import p652yj.C7346b;

/* compiled from: PpointLossHistoryViewHolder.kt */
/* renamed from: jp.pxv.android.viewholder.PpointLossHistoryViewHolder */
/* loaded from: classes2.dex */
public final class PpointLossHistoryViewHolder extends RecyclerView.AbstractC0819y {
    private final ViewHolderPpointLossHistoryItemBinding binding;
    public static final Companion Companion = new Companion(null);
    public static final int $stable = 8;

    /* compiled from: PpointLossHistoryViewHolder.kt */
    /* renamed from: jp.pxv.android.viewholder.PpointLossHistoryViewHolder$Companion */
    /* loaded from: classes2.dex */
    public static final class Companion {
        private Companion() {
        }

        public /* synthetic */ Companion(DefaultConstructorMarker eVar) {
            this();
        }

        public final PpointLossHistoryViewHolder createViewHolder(ViewGroup viewGroup) {
            ViewHolderPpointLossHistoryItemBinding e8Var = (ViewHolderPpointLossHistoryItemBinding) C7346b.m327a(viewGroup, "parent", R.layout.view_holder_ppoint_loss_history_item, viewGroup, false);
            MutabilityOwnership.m3746l(e8Var, "binding");
            return new PpointLossHistoryViewHolder(e8Var, null);
        }
    }

    private PpointLossHistoryViewHolder(ViewHolderPpointLossHistoryItemBinding e8Var) {
        super(e8Var.f2666e);
        this.binding = e8Var;
    }

    public /* synthetic */ PpointLossHistoryViewHolder(ViewHolderPpointLossHistoryItemBinding e8Var, DefaultConstructorMarker eVar) {
        this(e8Var);
    }

    public final void bind(PpointLossHistoryAdapter.C1113a aVar) {
        MutabilityOwnership.m3745m(aVar, "point");
        this.binding.f21513q.setText(aVar.f4916a);
        this.binding.f21514r.setText(aVar.f4917b);
        this.binding.f21515s.setText(aVar.f4919d);
        this.binding.f21517u.setText(aVar.f4918c);
        this.binding.f21516t.removeAllViews();
        for (PpointLossHistoryAdapter.C1114b bVar : aVar.f4920e) {
            Context context = this.binding.f2666e.getContext();
            MutabilityOwnership.m3746l(context, "binding.root.context");
            SplitOfAmountView o0Var = new SplitOfAmountView(context, null, 0, 6);
            String str = bVar.f4921a;
            String str2 = bVar.f4922b;
            MutabilityOwnership.m3745m(str, "service");
            MutabilityOwnership.m3745m(str2, "point");
            ViewSplitOfAmountBinding obVar = o0Var.f24069a;
            if (obVar != null) {
                obVar.f22069r.setText(str);
                ViewSplitOfAmountBinding obVar2 = o0Var.f24069a;
                if (obVar2 != null) {
                    obVar2.f22068q.setText(str2);
                    LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, -2);
                    layoutParams.gravity = 5;
                    o0Var.setLayoutParams(layoutParams);
                    this.binding.f21516t.addView(o0Var);
                } else {
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
            } else {
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        }
    }
}
